# 参数计算函数
def cycle_calc(FREQ, Width_us, Delay_us):
    T_ns = (1/FREQ)*10**9
    Width_ns = Width_us*10**3
    Delay_ns = Delay_us*10**3
    T_idle = Width_ns + Delay_ns
    if T_idle < T_ns:
        _100ms_num = int((T_ns-T_idle)/(100*10**6))
        _4ns_num = int((T_ns-T_idle-_100ms_num*100*10**6)/4)
        
    else:
        _100ms_num = 0
        _4ns_num = 0
    #print(_100ms_num, _4ns_num)
    return (_100ms_num, _4ns_num)
if __name__ == "__main__":
    FREQ = 1  # 1 Hz
    Width_us = 0  # 100 us
    Delay_us = 0 # 
    cycle_calc(FREQ, Width_us, Delay_us)